#include <iostream>
#include <iomanip>
using namespace std;

// 根据成绩获取对应绩点
double getGradePoint(int score) {
    if (score >= 90) return 4.0;
    else if (score >= 85) return 3.7;
    else if (score >= 82) return 3.3;
    else if (score >= 78) return 3.0;
    else if (score >= 75) return 2.7;
    else if (score >= 72) return 2.3;
    else if (score >= 68) return 2.0;
    else if (score >= 64) return 1.5;
    else if (score >= 60) return 1.0;
    else return 0.0;
}

int main() {
    int n;
    cin >> n;
    
    // 读取学分
    int credits[n];
    for (int i = 0; i < n; i++) {
        cin >> credits[i];
    }
    
    // 读取成绩
    int scores[n];
    for (int i = 0; i < n; i++) {
        cin >> scores[i];
    }
    
    double totalGradePoints = 0.0;  // 总学分绩点
    int totalCredits = 0;           // 总学分
    
    // 计算每门课的学分绩点并累加
    for (int i = 0; i < n; i++) {
        double gradePoint = getGradePoint(scores[i]);
        totalGradePoints += gradePoint * credits[i];
        totalCredits += credits[i];
    }
    
    // 计算总评绩点 GPA
    double gpa = totalGradePoints / totalCredits;
    
    // 输出结果，保留两位小数
    cout << fixed << setprecision(2) << gpa << endl;
    
    return 0;
}